const Mock = require("mockjs");

let data = Mock.mock({
  "data|6": [
    {
      "id|+1": 1, //得到随机的id对象
      username: "@cname()", //随机生成中文名字
      date: "@date()", //随机生成日期
      avatar: "@image('10*10','red','#fff')",
      description: "@ctitle(10)", //描述
      ip: "@ip()", //ip地址
      email: "@email()", //email地址
      // fruit: "@fruit()",
      pageviews: "@integer(300, 5000)", //浏览量
      Address: "@county(true)", //随机地址
    },
  ],
});

Mock.mock("/info", "get", () => {
  return data;
});
